package com.eddie.prototype.improve;

import lombok.extern.java.Log;
import lombok.extern.slf4j.Slf4j;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Eddie
 * @date 2022/4/29 18:02
 */
@Slf4j
public class Client {
    public static void main(String[] args) {
        Sheep sheep = new Sheep("tom",1,"白色");
        List<Sheep> sheeps = new ArrayList<>();
        System.out.println("原型模式完成对象创建");
        for (int i = 0; i < 10; i++) {
            sheeps.add(sheep.clone());
        }
        for (Sheep sheepAgan : sheeps) {
            log.info(sheepAgan.toString());
        }


    }
}
